import request from "@/plugins/request"

// 获取默认地址
export const getDefaultAddress = () => {
  return request({
    url: "app-api/member/address/get-default",
    method: "get",
  })
}

// 获取默认银行
export const getDefaultBank = () => {
  return request({
    url: "app-api/member/bank/get-default",
    method: "get",
  })
}

// 检查是否注册
export const checkRegister = (params) => {
  return request({
    url: "app-api/member/auth/checkRegister",
    method: "post",
    data: params,
  })
}
// 获得订单结算信息
export const getSettlement = (params) => {
  return request({
    url: "app-api/trade/order/settlement",
    method: "post",
    data: params,
  })
}

// 创建订单
export const createOrder = (params) => {
  return request({
    url: "app-api/trade/order/create",
    method: "post",
    data: params,
  })
}
// 提交订单
export const payOrder = (params) => {
  return request({
    url: "app-api/pay/order/submit",
    method: "post",
    data: params,
  })
}
